package com.dreamchaser.familydevice;

import com.dreamchaser.familydevice.config.CustomApplicationListenerStarted;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@ServletComponentScan   // druid监控页面是一个servlet，需要让SpingBoot支持servlet
@SpringBootApplication //(exclude = {DataSourceAutoConfiguration.class}) // 忽略mysql factory
@EnableAsync            // 开启注解线程池
@EnableScheduling
public class FamilydataApplication {


    public static void main(String[] args) {
        SpringApplication context = new SpringApplication(FamilydataApplication.class);
        context.addListeners(new CustomApplicationListenerStarted());
        context.run(args);
        //SpringApplication.run(FamilydataApplication.class, args);
    }

}
